﻿//
// Created: 2018/9/27
// Author: chenqiang
//
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;

namespace Model.WXshopBuiness.Map
{
    internal  class PromotionsMap:EntityTypeConfiguration< Promotions >    
    {
        public PromotionsMap()
        {
             this.ToTable("Promotions");
             this.HasKey(i => new { i.PromotionID });
             this.Property(i => i.PromotionID).HasColumnName("PromotionID");                     
             this.Property(i => i.PromotionName).HasColumnName("PromotionName");                     
             this.Property(i => i.StartTime).HasColumnName("StartTime");                     
             this.Property(i => i.EndTime).HasColumnName("EndTime");                     
             this.Property(i => i.Param1).HasColumnName("Param1");                     
             this.Property(i => i.Param2).HasColumnName("Param2");                     
             this.Property(i => i.Param3).HasColumnName("Param3");                     
             this.Property(i => i.Param4).HasColumnName("Param4");                     
             this.Property(i => i.Param5).HasColumnName("Param5");                     
             this.Property(i => i.Param1Name).HasColumnName("Param1Name");                     
             this.Property(i => i.Param2Name).HasColumnName("Param2Name");                     
             this.Property(i => i.Param3Name).HasColumnName("Param3Name");                     
             this.Property(i => i.Param4Name).HasColumnName("Param4Name");                     
             this.Property(i => i.Param5Name).HasColumnName("Param5Name");
             this.Property(i => i.PromotionUnidName).HasColumnName("PromotionUnidName");
             this.Property(i => i.Disable).HasColumnName("Disable");
             this.Property(i => i.CreateTime).HasColumnName("CreateTime");
            this.Property(i => i.Remarks).HasColumnName("Remarks");

        }   
    }
    
     public static class PromotionsMapExtensions
    {
        public static void UserPromotionsMap(this DbModelBuilder pModelBuilder)
        {
            pModelBuilder.Configurations.Add(new PromotionsMap());
        }
    }
}